home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / Macintosh Tracker 1.1 Source / Original Tracker 3.10 Source / song.h < prev    next >
Text File  |  1993-05-22  |  2KB  |  99 lines

  1. /* song.h */
  2.  
  3. /* internal data structures for the soundtracker player routine....
  4.  */
  5.  
  6. /* $Id: song.h,v 3.2 1992/11/23 10:12:23 espie Exp espie $
  7.  * $Log: song.h,v $
  8.  * Revision 3.2  1992/11/23  10:12:23  espie
  9.  * *** empty log message ***
  10.  *
  11.  * Revision 3.1  1992/11/19  20:44:47  espie
  12.  * Protracker commands.
  13.  *
  14.  * Revision 3.0  1992/11/18  16:08:05  espie
  15.  * New release.
  16.  *
  17.  * Revision 2.5  1992/10/31  11:18:00  espie
  18.  * New fields for optimized resampling.
  19.  * Exchanged __ANSI__ to SIGNED #define.
  20.  */
  21.  
  22. #ifdef SIGNED
  23. typedef signed char SAMPLE;
  24. #else
  25. typedef char SAMPLE;
  26. #endif
  27.  
  28. #define NUMBER_SAMPLES 32
  29.  
  30. #define BLOCK_LENGTH 64
  31. #define NUMBER_TRACKS 4
  32. #define NUMBER_PATTERNS 128
  33.  
  34. #define NUMBER_EFFECTS 16
  35.  
  36. #define SAMPLENAME_MAXLENGTH 22
  37. #define TITLE_MAXLENGTH 20
  38.  
  39. #define MIN_PITCH 113
  40. #define MAX_PITCH 856
  41.  
  42. #define MIN_VOLUME 0
  43. #define MAX_VOLUME 64
  44.  
  45. /* the fuzz in note pitch */
  46. #define FUZZ 2
  47.  
  48. /* we refuse to allocate more than 500000 bytes for one sample */
  49. #define MAX_SAMPLE_LENGTH 500000
  50.  
  51. struct sample_info
  52.    {
  53.    char *name;
  54.    int  length, rp_offset, rp_length;
  55.    unsigned long  fix_length, fix_rp_length;
  56.    int volume;
  57.    int finetune;
  58.    SAMPLE *start, *rp_start;
  59.    };
  60.  
  61. /* the actual parameters may be split in two halves occasionnally */
  62.  
  63. #define LOW(para) ((para) & 15)
  64. #define HI(para) ((para) >> 4)
  65.  
  66. struct event
  67.    {
  68.    unsigned char sample_number;
  69.    unsigned char effect;
  70.    unsigned char parameters;
  71.    unsigned char note;
  72.    int pitch;
  73.    };
  74.  
  75. struct block
  76.    {
  77.    struct event e[NUMBER_TRACKS][BLOCK_LENGTH];
  78.    };
  79.     
  80.         
  81. struct song_info
  82.    {
  83.    int length;
  84.    int maxpat;
  85.    int transpose;
  86.    char patnumber[NUMBER_PATTERNS];
  87.    struct block *pblocks;
  88.    };
  89.  
  90. struct song
  91.    {
  92.    char *title;
  93.       /* sample 0 is always a dummy sample */
  94.    struct sample_info samples[NUMBER_SAMPLES];
  95.    struct song_info info;
  96.    };
  97.  
  98. #define AMIGA_CLOCKFREQ 3575872
  99.